﻿#if($msg)
<script>
alert('$!msg');
</script>
#end
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>待办事项管理</title>
<link href="/include/manage/images/main/style.css" rel="stylesheet" type="text/css" />
<link href="/include/manage/ui/jquery-ui.css" rel="stylesheet" type="text/css" />
<style type="text/css">
#thumbnails{list-style:none;margin-left:0;}
#thumbnails li{
	float:left;
	width:124px;
	border:1px solid gray;
	margin:4px;
}
#thumbnails li img.view{
	margin:1px;
	border:1px solid #F1F1F1;
}
input.noborder{
	border:none;
}
input.border{
	border:1px solid gray;
}
</style>
<script language="javascript" src="/include/manage/js/jquery.js"></script>
<script type="text/javascript" src="/include/manage/js/jquery-ui.js"></script>
<script type="text/javascript" src="/include/manage/swfupload/swfupload.js"></script>
<script type="text/javascript" src="/include/manage/swfupload/swfupload.queue.js"></script>
<script type="text/javascript" src="/include/manage/swfupload/fileprogress.js"></script>
<script type="text/javascript" src="/include/manage/swfupload/pic_handlers.js"></script>
<script type="text/javascript" src="/include/manage/js/portal_pic.js"></script>
<script language="javascript">
var sel_all=false;
var gen_spic=0;

jQuery.ajaxSetup ({  
	cache: false
});

$(function(){
				$('.button').button();
				$('#dialog').dialog({
					autoOpen: false,
					width: 600,
					buttons: {
						"确定": function() {
							$(this).dialog("close");
						}
					}
				});
				
				$('#selAll').click(function(){
					if(sel_all==true){
						$('.sel_input').removeAttr("checked");//取消全选
						sel_all=false;
					}else{
						$('.sel_input').attr("checked",'true');//全选
						sel_all=true;
					}
				});

});

function auditPic(id){
	if(confirm('确定要审核吗?')){
		$('#deleteid').val(id);
		$('#parameter').val('audit');
		$('#delform').submit();
	}
}

function delPic(id){
	if(confirm('确定要删除吗?')){
		$('#deleteid').val(id);
		$('#delform').submit();
	}
}

function auditSel(){
	if(confirm('确定要审核吗?')){
		var str='';
        $("input[name='sel_id'][checked]").each(function(){
              str+=$(this).val()+",";
         });
         $('#parameter').val('audit');
         $('#deleteid').val(str);
         $('#delform').submit();
	}
}

function delSel(){
	if(confirm('确定要删除吗?')){
		var str='';
        $("input[name='sel_id'][checked]").each(function(){
              str+=$(this).val()+",";
         });
         $('#deleteid').val(str);
         $('#delform').submit();
	}
}

function showSpicSetting(){
	if($('#spicsetting')[0].style.display=='none'){
		$('#spicsetting')[0].style.display='';
		gen_spic=1;
	}else{
		$('#spicsetting')[0].style.display='none';
		gen_spic=0;
	}
}
</script>
</head>
<body>
<form id="delform" name="delform" action="/manage_work.ad" method="post">
	<input id="parameter" type="hidden" name="parameter" value="delete" />
	<input type="hidden" name="tid" value="$!tid" />
	<input id="deleteid" type="hidden" name="id" value="" />
</form>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30" background="/include/manage/images/main/tab_05.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="30"><img src="/include/manage/images/main/tab_03.gif" width="12" height="30" /></td>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="46%" valign="middle"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="5%"><div align="center"><img src="/include/manage/images/main/tb.gif" width="16" height="16" /></div></td>
                <td width="95%"><span class="STYLE3">当前位置</span>：[待办事项]-[待 审 核]</td>
              </tr>
            </table></td>
            <td width="54%"><table border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
				<td width="54%"><table border="0" align="right" cellpadding="0" cellspacing="0">
              <tr>
                <td width="52"><table width="88%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><a href="javascript:auditSel()"><img src="/include/manage/images/main/11.gif" width="14" height="14" /></a></div></td>
                    <td><div align="center"><a href="javascript:auditSel()">审核</a></div></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
                <td width="52"><table width="88%" border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div align="center"><a href="javascript:delSel()"><img src="/include/manage/images/main/11.gif" width="14" height="14" /></a></div></td>
                    <td><div align="center"><a href="javascript:delSel()">删除</a></div></td>
                  </tr>
                </table></td>
              </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="16"><img src="/include/manage/images/main/tab_07.gif" width="16" height="30" /></td>
      </tr>
    </table></td>
  </tr>
  <tr>
  	<td>
	<table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="8" background="/include/manage/images/main/tab_12.gif">&nbsp;</td>
        <td>
			<table class="edit_list" width="100%" cellspacing="0" cellpadding="0">
					<tr>
						<th width="*" height="38" align="left"><h4>待审核的图片</h4></th>
						<th width="250" align="right">
							<div style="float: right">
							<input id="selAll" type="button" class="button" value="全选"/>
							<input type="button" class="button" value="审核通过" onClick="auditSel()"/>
							<input type="button" class="button" value="删除选定" onClick="delSel()" />
							</div>
						</th>
					</tr>
					<tr>
						<td colspan="2">
						<div>
						<ul id="thumbnails" class="column">
                        #foreach ($pic in $workList)
						<li class="portlet" id="$!pic.id">
							<img src="$!pic.path" width="120" class="view"/><br/>
							<input name="sel_id" type="checkbox" class="sel_input" value="$!pic.id" />
							$!pic.author<br/>
                            <a href="javascript:auditPic('$!pic.id')"><img src="/include/manage/images/main/edt.gif" align="absmiddle"/>审核</a>
							<a href="javascript:delPic('$!pic.id')"><img src="/include/manage/images/main/del.gif" align="absmiddle"/>删除</a>
						</li>
                        #end
                        </ul>
                        </div>
                        </td>
                     </tr>
             </table>
		</td>
        <td width="8" background="/include/manage/images/main/tab_15.gif">&nbsp;</td>
      </tr>
    </table></td>
    </tr>
  <tr>
    <td height="35" background="/include/manage/images/main/tab_19.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="12" height="35"><img src="/include/manage/images/main/tab_18.gif" width="12" height="35" /></td>
        <td valign="top">
        </td>
        <td width="16"><img src="/include/manage/images/main/tab_20.gif" width="16" height="35" /></td>
      </tr>
    </table>
	</td>
  </tr>
</table>
</body>
</html>